package org.tis.tools.abf.module.ac.entity.vo;

import lombok.Data;
import org.tis.tools.abf.module.ac.entity.AcFunc;
import org.tis.tools.abf.module.ac.entity.enums.FuncType;
import org.tis.tools.abf.module.common.entity.enums.YON;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Created by chenchao
 * Created on 2018/8/17 14:29
 */
@Data
public class AcFuncExit {

    private String guid;

    private String guidApp;

    private FuncType funcType;

    private String funcCode;

    private String funcName;

    private String funcDesc;

    private YON isopen;

    private YON ischeck;

    private String guidFunc;

    private BigDecimal displayOrder;

    private String uiEntry;

    private Date createtime;

    private Date lastupdate;

    private String updator;

    private String dataStatus;

    private String serviceEntry;

    /**用于标注该功能或行为是否被分配*/
    private String exit;

    /**用于存放该功能下的所有行为*/
    private List<AcFuncExit> childs;

    /**功能行为是否来自角色*/
    private String fromRole;

    /**功能行为是否为特别禁止*/
    private String authType;

    public AcFuncExit(){}

    /**
     * 有参构造
     * @param acFunc 功能行为
     * @param exit 是否被分配(已分配:false,未分配:true)
     * @param childs 用于存放功能下的所有行为
     * @param fromRole 行为是否来自于角色(来自角色:Y,未来自角色:N)
     * @param authType 来自操作员的行为是否特别禁止(允许:remit,禁止:forbid)
     */
    public AcFuncExit(AcFunc acFunc, String exit, List<AcFuncExit> childs, String fromRole, String authType){
        this.guid = acFunc.getGuid();
        this.guidApp = acFunc.getGuidApp();
        this.funcType = acFunc.getFuncType();
        this.funcCode = acFunc.getFuncCode();
        this.funcName = acFunc.getFuncName();
        this.funcDesc = acFunc.getFuncDesc();
        this.isopen = acFunc.getIsopen();
        this.ischeck = acFunc.getIscheck();
        this.guidFunc = acFunc.getGuidFunc();
        this.displayOrder = acFunc.getDisplayOrder();
        this.uiEntry = acFunc.getUiEntry();
        this.createtime = acFunc.getCreatetime();
        this.lastupdate = acFunc.getLastupdate();
        this.updator = acFunc.getUpdator();
        this.dataStatus = acFunc.getDataStatus();
        this.serviceEntry = acFunc.getServiceEntry();
        this.exit = exit;
        this.childs = childs;
        this.fromRole = fromRole;
        this.authType = authType;
    }
}
